﻿using RPAVIEW.util;
using System.Windows.Controls;
using RPAVIEW.views.controlLibrary;

namespace RPAVIEW.views.EditPage.flows.ClickTextN {
    /// <summary>
    /// Input.xaml 的交互逻辑
    /// </summary>
    public partial class Input:BaseParamViewAction{
        public Input() {
            InitializeComponent();
        }

        public override void UpdateSource() {
            this.searchAreaBox.GetBindingExpression(ComboBox.SelectedIndexProperty).UpdateSource();
            this.buttonTypeBox.GetBindingExpression(ComboBox.SelectedIndexProperty).UpdateSource();
            this.clickTypeBox.GetBindingExpression(ComboBox.SelectedIndexProperty).UpdateSource();
            this.searchText.GetBindingExpression(SelVarTextBox.text).UpdateSource();
            this.windowObj.GetBindingExpression(SelVarTextBox.text).UpdateSource();
            this.selectPostion.GetBindingExpression(SelVarTextBox.text).UpdateSource();
        }

        private void SearchAreaChanged(object sender, SelectionChangedEventArgs e) {
            if(this.searchAreaBox.SelectedIndex == 2) {
                ElementUtil.ShowRow(this.winobjrow);
            } else { 
                ElementUtil.HideRow(this.winobjrow);
            }
        }
    }
}
